package com.wzh.user.controller;

import com.alibaba.csp.sentinel.slots.block.BlockException;
import com.wzh.common.utils.R;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * @author WZH
 * @title: ExceptionConfig
 * @projectName find_house
 * @description:
 * @date 2022/3/29
 */
public final class ExceptionConfig {
    public static R handleException(@RequestParam Map<String, Object> params, BlockException ex) {
        System.err.println("错误发生: " + ex.getClass().getCanonicalName());
        return R.error("发生降级了");
    }
}